<?php

declare(strict_types=1);

namespace App\Services;

use Hyperf\Di\Annotation\Inject;
use App\Exception\ApiException;
use App\Constants\ErrorCode;
use App\Model\Order;

class OrderService extends BaseService
{

    public function list(array $params)
    {
        $model = Order::query()->select('id','category','title','image','price','num')->where('category_id', $params['category_id']);
        $list = $this->usePage($model)->toArray();

        return $list;
    }

}